import logging 
#设置日志等级
logging.basicConfig(level=logging.DEBUG, filename="./log/p2p.log")  # 设置日志级别
#调用日志

logging.debug("调试级别")
logging.info("信息级别")
logging.warning("警告级别")
logging.error("断言错误")
logging.critical("严重错误")